<?php
    session_start();
	if(!isset($_SESSION['username'])){
		header("Location: thesis_login_register.php");
	}
?>
<?php
$User_ID= trim ($_SESSION['User_ID']);
$Pet_ID = $_GET['pet_id'];
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="This is a sample website using bootstrap">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Petformance</title>

    <!-- Bootstrap core CSS -->
    <link href="bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" href="bootstrap/font-awesome/css/font-awesome.min.css">
    <!-- Custom styles for this template -->
	 <link href="user_css.css" rel="stylesheet">
	 <link href="bootstrap-social.css" rel="stylesheet">
	 <link href="placeholder.css" rel="stylesheet">
	 
	  

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="bootstrap/docs/assets/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  <!-- Layer8 version 2.0.0.123 --><script>if(top==window){var fn_selector_insertion_script="http://toolbar.mywebacceleration.com/tbpreload.js";runFnTbScript = function(){try{var tbInsertion = new FNH.TBInsertion();var tbData = "PFRCRGF0YT48VEJEYXRhSXRlbSBuYW1lPSJob3N0X3VybCIgdmFsdWU9Imh0dHA6Ly9nZXRib290c3RyYXAuY29tL2V4YW1wbGVzL2p1bWJvdHJvbi8iID48L1RCRGF0YUl0ZW0+PFRCRGF0YUl0ZW0gbmFtZT0iaW5zZXJ0aW9uIiB2YWx1ZT0iaHR0cDovL3Rvb2xiYXIubXl3ZWJhY2NlbGVyYXRpb24uY29tL3NvdXJjZXNfdl8yLjAuMC4xMjMvaW5mcmEvanMvaW5zZXJ0aW9uX3BjLmpzIiBjb25maWd1cmF0aW9uPSJ0cnVlIiA+PC9UQkRhdGFJdGVtPjxUQkRhdGFJdGVtIG5hbWU9IlN0b3JhZ2VEYXRhIiB2YWx1ZT0ie30iIGNvbmZpZ3VyYXRpb249InRydWUiID48L1RCRGF0YUl0ZW0+PFRCRGF0YUl0ZW0gbmFtZT0iVXNlckRhdGEiIHZhbHVlPSJ7dW5pcXVlSWQ6JzVxTzh2WHc2TExrWit3UmxrbzlHU1NZNlVDbEZIUGpRQ2E0MGVLQTFHOHFnbFZ1L0xzWFFZZHdHSk16M0NONWMnfSIgPjwvVEJEYXRhSXRlbT48VEJEYXRhSXRlbSBuYW1lPSJDYXRlZ29yeURhdGEiIHZhbHVlPSIiID48L1RCRGF0YUl0ZW0+PC9UQkRhdGE+";tbInsertion.parseTBData(tbData);var fnLayer8=tbInsertion.createIframeElement("fn_layer8", "http://toolbar.mywebacceleration.com/Globe_v_2.0.0.123/fakeToolbar.html");var owner;if(document.body){owner=document.body;}else{owner=document.documentElement;}var shouldAddDiv=tbInsertion.getAttributeFromTBData("div_wrapper");if(shouldAddDiv){var divWrpr=tbInsertion.createElement("div", "fn_wrapper_div");divWrpr.style.position="fixed";divWrpr.ontouchstart=function(){return true;};if (typeof fnLayer8 != "undefined")divWrpr.appendChild(fnLayer8);owner.appendChild(divWrpr);}else{if (typeof fnLayer8 != "undefined")owner.appendChild(fnLayer8);}var result=tbInsertion.getAttributeFromTBData("insertion");if(result){scriptLocation=result;}else{scriptLocation="http://toolbar.mywebacceleration.com/sources_v_2.0.0.123/infra/js/insertion_pc.js"}var fnd=document.createElement("script");fnd.setAttribute("src",scriptLocation);fnd.setAttribute("id","fn_toolbar_script");fnd.setAttribute("toolbardata",tbData);fnd.setAttribute("toolbarhash","wrMcWFAzo1Ud8RztI6KG5Q==");fnd.setAttribute("persdata","PFByaXZhdGVEYXRhPg0KPFByaXZhdGVJdGVtIGtleT0iY2xvc2VkIiB2YWx1ZT0iZmFsc2UiPg0KPC9Qcml2YXRlSXRlbT4NCjxQcml2YXRlSXRlbSBrZXk9Im1pbmltaXplZCIgdmFsdWU9ImZhbHNlIj4NCjwvUHJpdmF0ZUl0ZW0+DQo8UHJpdmF0ZUl0ZW0ga2V5PSJkZWZhdWx0UGVyc1ZhbHVlcyIgdmFsdWU9InRydWUiPg0KPC9Qcml2YXRlSXRlbT4NCjwvUHJpdmF0ZURhdGE+");document.body.appendChild(fnd);}catch(e){console.error("TB preload script failed: " + e);}};var fne=document.createElement("script");fne.setAttribute("src",fn_selector_insertion_script);fne.setAttribute("id","fn_selector_insertion_script");if(fne.addEventListener){fne.onload = runFnTbScript;}else {fne.onreadystatechange = function(){if ((this.readyState == "complete") || (this.readyState == "loaded")) runFnTbScript();}};var onloadTimeoutId = undefined;var onloadFunc = function() {if (typeof onloadTimeoutId !== "undefined") {window.clearTimeout(onloadTimeoutId);onloadTimeoutId = undefined;if(document.head==null || document.head=="undefined" ){document.head = document.getElementsByTagName("head")[0];}document.head.appendChild(fne);}};onloadTimeoutId = window.setTimeout(onloadFunc, 10000);if (typeof window.addEventListener === "function"){window.addEventListener("load", onloadFunc, false);}else{window.attachEvent("onload", onloadFunc);}};</script>
  </head>
  

  <body>

<!-- MENU BAR! -->
        <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="thesis_vet_page.php?page=1&pet_id="><img src="images/logo.png" style="position:relative; top:-10px; alt="Responsive image"></a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
                                <ul class="nav navbar-nav navbar-right">
								
								
										 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">
											<span class="glyphicon glyphicon-globe"></span></a>
											<ul class="dropdown-menu">
												<li>
													<div class="navbar-content">
														<div class="row">
															<div class="col-md-5">												
															</div>
																<div class="col-md-7">
																</div>
														</div>
													</div>
													<div class="navbar-footer">
														<div class="navbar-footer-content">
															<div class="row">
															</div>
														</div>
													</div>
												</li>
											</ul>
										</li>
										
                                    <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                        <span class="glyphicon glyphicon-user"></span></a>
                                        <ul class="dropdown-menu">
                                            <li>
                                                <div class="navbar-content">
                                                    <div class="row">
                                                        <div class="col-md-5">													
															<form action="thesis_upload_profile_picture_vet.php" method="post" enctype="multipart/form-data">
															<?php

														require_once("includes/database.php"); 
														$sql="SELECT * FROM user_db
														WHERE User_ID = '{$User_ID}'";
														 $result=mysql_query($sql,$con);
														 
														 if (false === $result) {
																echo mysql_error();
															}
															
														 while($row=mysql_fetch_array($result))
														 {

														?>	
																<img src="profile_picture/<?php echo $row['Profile_Picture']; ?>" class="img-responsive img-thumbnail"  style="width:120px;height:120px;"/>																
																<div class="fileUpload btn btn-sm btn-primary" style="position:relative; left:-10px; top:-6px; width:105px;">
																	<span>Upload Image</span>
																	<input type="file" class="upload" name="fileToUpload" id="fileToUpload"  onchange="document.getElementById('submit_button_id').click();"/>
																	</div>
																	<input type="submit" value="Upload Image" name="submit" id="submit_button_id" style="visibility:hidden">
															</form>
                                                        </div>
														
																					
						
                                                        <div class="col-md-7">
                                                            <span><?php echo $row['First_Name']; ?> <?php echo $row['Last_Name']; ?></span>
                                                            <p class="text-muted small">
                                                                <?php echo $row['Email_Address']; ?></p>
																<?php } ?>
                                                            <div class="divider">
                                                            </div>
                                                            <a href="thesis_logout.php" class="btn btn-primary btn-sm active pull-right">Sign Out</a>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="navbar-footer">
                                                    <div class="navbar-footer-content">
                                                        <div class="row">
                                                        </div>
                                                    </div>
                                                </div>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
	
	
	
	
	
			
	  
        </div><!-- /.nav-collapse -->
      </div><!-- /.container -->
    </nav><!-- /.navbar -->
<br>
						<!-- =================================MENU BAR END!================================= -->					

<!-- =================================MAIN CONTENT================================= -->
<div class="container">
    <div class="row">
  		<div class="col-sm-3"><!--left col-->
		
		<ul class="list-group">
							<?php

							require_once("includes/database.php"); 
							$sql="SELECT * FROM user_db
							WHERE User_ID = '{$User_ID}'";
							 $result=mysql_query($sql,$con);
							 
							 if (false === $result) {
									echo mysql_error();
								}
								
							 while($row=mysql_fetch_array($result))
							 {

							?>
					
            <li class="list-group-item text-muted">Your Information</li>
            <li class="list-group-item text-right"><span class="pull-left"><strong>Joined</strong></span> <?php echo $row['Joined']; ?></li>
            <li class="list-group-item text-right"><span class="pull-left"><strong>Real name</strong></span> <?php echo $row['First_Name']; ?> <?php echo $row['Last_Name']; ?></li>
            <li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> <?php echo $row['Email_Address']; ?></li>
			<li class="list-group-item text-right"><span class="pull-left"><strong>Contact Number</strong></span> <?php echo $row['Contact_Number']; ?></li>
			<?php } ?>
														<?php

														require_once("includes/database.php"); 
														$sql="SELECT * FROM pet_info_db
														WHERE Pet_Vet_User_ID = '{$User_ID}'";
														 $result=mysql_query($sql,$con);
														 $num_rows = mysql_num_rows($result);


														?>	
			<li class="list-group-item text-right"><span class="pull-left"><strong>Number of 	Patients</strong></span> <?php echo $num_rows; ?></li>
          </ul> 
			<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
		  
             				
          
          
        </div><!--/col-3-->
    	<div class="col-sm-9">  
          <ul class="nav nav-tabs" id="myTab">
            <li class="active"><a href="#pet_health" data-toggle="tab">Your Patients</a></li>
            <li><a href="thesis_vet_page_add_patient.php?page=1&pet_id=">Add Patient</a></li>
            <li><a href="#update_profile" data-toggle="tab">Update Profile</a></li>
          </ul>
			  
          <div class="tab-content">		  
			 <div class="tab-pane" id="update_profile">
            		
               	
                  <hr>
                 <form class="form" action="thesis_vet_page_update_profile_saving.php" method="post" id="registrationForm">
							<?php
							require_once("includes/database.php"); 
							$sql="SELECT * FROM user_db
							WHERE User_ID = '{$User_ID}'";
							 $result=mysql_query($sql,$con);
							 
							 if (false === $result) {
									echo mysql_error();
								}
								
							 while($row=mysql_fetch_array($result))
							 {

							?>
				  
                      <div class="form-group">
                          
                          <div class="col-xs-6">
                              <label for="first_name"><h4>First name</h4></label>
                              <input type="text" class="form-control" name="first_name" id="first_name" placeholder="<?php echo $row['First_Name']; ?>" title="enter your first name if any." readonly>
                          </div>
                      </div>
                      <div class="form-group">
                          
                          <div class="col-xs-6">
                            <label for="last_name"><h4>Last name</h4></label>
                              <input type="text" class="form-control" name="last_name" id="last_name" placeholder="<?php echo $row['Last_Name']; ?>" title="enter your last name if any."readonly>
                          </div>
                      </div>
					   <div class="form-group">
                          
                          <div class="col-xs-6">
                              <label for="email"><h4>Email</h4></label>
                              <input type="email" class="form-control" name="email" id="email" value="<?php echo $row['Email_Address']; ?>" title="enter your email.">
                          </div>
                      </div>
                      <div class="form-group">
                          <div class="col-xs-6">
                             <label for="mobile"><h4>Contact Number</h4></label>
                              <input type="text" class="form-control" name="contact_number" id="contact_number" value="<?php echo $row['Contact_Number']; ?>" title="enter your contact number if any.">
                          </div>
                      </div>
                      <div class="form-group">
                          
                          <div class="col-xs-6">
                              <label for="password"><h4>Password</h4></label>
                              <input type="password" class="form-control" name="password" id="password" required placeholder="Type Password" title="enter your password so you can update your profile.">
                          </div>
                      </div>
                      <div class="form-group">
                          
                          <div class="col-xs-6">
                            <label for="password2"><h4>New Password</h4></label>
                              <input type="password" class="form-control" name="new_password" id="password2" value="<?php echo $row['Password']; ?>" placeholder="Type New Password" title="enter your new password.">
							  <?php } ?>
							  
                          </div>
                      </div>
                      <div class="form-group">
                           <div class="col-xs-12">
                                <br>
                              	<button class="btn btn-lg btn-success" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Save</button>
                               	<button class="btn btn-lg" type="reset"><i class="glyphicon glyphicon-repeat"></i> Reset</button>
                            </div>
                      </div>
              	</form>
              </div>
		
		
		
		
            <div class="tab-pane active" id="pet_health">
				<hr><br>
			<!--include patient searchbar --> <?php include "patient_searchBar.php";?>
			
			
              <div class="table-responsive" style="height: 270px; overflow: auto">
								<?php
							require_once("includes/database.php"); 
							
							$page=$_GET["page"];
							
							if($page=="" || $page=="1")
							{
							$page1=0;	
								
							}
							else{
								$page1=($page*5)-5;
								
							}
							
							
							
							
							$sql = "SELECT *, Current_Date(),\n"
							. " TIMESTAMPDIFF(YEAR,Pet_Birthday,Current_Date()) AS Pet_Age\n"
							. " FROM pet_info_db,vaccine_db\n" 
							. " WHERE pet_info_db.Pet_ID = vaccine_db.Pet_ID and pet_info_db.Pet_Vet_User_ID = '{$User_ID}' LIMIT $page1,5";
							 $result=mysql_query($sql,$con);
						

							 
							 if (false === $result) {
									echo mysql_error();
								}
								
								echo  " <table class='table table-hover' id='table'>
								  <thead>
									<tr>
									  <th class='hide'><center>Pet_ID</center></th>
									  <th><center>Pet_Name</center></th>
									  <th><center>Pet_Type</center></th>
									  <th><center>Pet_Breed</center></th>
									  <th><center>Pet_Gender</center></th>
									  <th><center>Pet_Age</center></th>
									  <th><center>Pet_Birthday</center></th>
									  <th><center>Owner_Name</center></th>
									
									</tr>
								  </thead>";
								  
							 while($row=mysql_fetch_array($result))
							 {
							 
							 
							 
							?>
																	
									<tbody id="your_patient">
									<tr class="rowMember"
									rabies_1st = "<?php echo $row['Rabies_1st']; ?>" 
									rabies_2nd = "<?php echo $row['Rabies_2nd']; ?>" 
									rabies_3rd = "<?php echo $row['Rabies_3rd']; ?>"
									rabies_4th = "<?php echo $row['Rabies_4th']; ?>"
									rabies_5th = "<?php echo $row['Rabies_5th']; ?>"
									rabies_6th = "<?php echo $row['Rabies_6th']; ?>"
									rabies_7th = "<?php echo $row['Rabies_7th']; ?>"
									rabies_8th = "<?php echo $row['Rabies_8th']; ?>"
									rabies_9th = "<?php echo $row['Rabies_9th']; ?>"
									rabies_10th = "<?php echo $row['Rabies_10th']; ?>"
									
									canine_parvovirus_1st = "<?php echo $row['Canine_Parvovirus_1st']; ?>"
									canine_parvovirus_2nd = "<?php echo $row['Canine_Parvovirus_2nd']; ?>"
									canine_parvovirus_3rd = "<?php echo $row['Canine_Parvovirus_3rd']; ?>"
									canine_parvovirus_4th = "<?php echo $row['Canine_Parvovirus_4th']; ?>"
									canine_parvovirus_5th = "<?php echo $row['Canine_Parvovirus_5th']; ?>"
									canine_parvovirus_6th = "<?php echo $row['Canine_Parvovirus_6th']; ?>"
									canine_parvovirus_7th = "<?php echo $row['Canine_Parvovirus_7th']; ?>"
									canine_parvovirus_8th = "<?php echo $row['Canine_Parvovirus_8th']; ?>"
									canine_parvovirus_9th = "<?php echo $row['Canine_Parvovirus_9th']; ?>"
									canine_parvovirus_10th = "<?php echo $row['Canine_Parvovirus_10th']; ?>"
									
									canine_distemper_1st = "<?php echo $row['Canine_Distemper_1st']; ?>"
									canine_distemper_2nd = "<?php echo $row['Canine_Distemper_2nd']; ?>"
									canine_distemper_3rd = "<?php echo $row['Canine_Distemper_3rd']; ?>"
									canine_distemper_4th = "<?php echo $row['Canine_Distemper_4th']; ?>"
									canine_distemper_5th = "<?php echo $row['Canine_Distemper_5th']; ?>"
									canine_distemper_6th = "<?php echo $row['Canine_Distemper_6th']; ?>"
									canine_distemper_7th = "<?php echo $row['Canine_Distemper_7th']; ?>"
									canine_distemper_8th = "<?php echo $row['Canine_Distemper_8th']; ?>"
									canine_distemper_9th = "<?php echo $row['Canine_Distemper_9th']; ?>"
									canine_distemper_10th = "<?php echo $row['Canine_Distemper_10th']; ?>"
									
									canine_adenovirus_2_1st = "<?php echo $row['Canine_Adenovirus_2_1st']; ?>" 
									canine_adenovirus_2_2nd = "<?php echo $row['Canine_Adenovirus_2_2nd']; ?>" 
									canine_adenovirus_2_3rd = "<?php echo $row['Canine_Adenovirus_2_3rd']; ?>" 
									canine_adenovirus_2_4th = "<?php echo $row['Canine_Adenovirus_2_4th']; ?>" 
									canine_adenovirus_2_5th = "<?php echo $row['Canine_Adenovirus_2_5th']; ?>" 
									canine_adenovirus_2_6th = "<?php echo $row['Canine_Adenovirus_2_6th']; ?>" 
									canine_adenovirus_2_7th = "<?php echo $row['Canine_Adenovirus_2_7th']; ?>" 
									canine_adenovirus_2_8th = "<?php echo $row['Canine_Adenovirus_2_8th']; ?>" 
									canine_adenovirus_2_9th = "<?php echo $row['Canine_Adenovirus_2_9th']; ?>" 
									canine_adenovirus_2_10th = "<?php echo $row['Canine_Adenovirus_2_10th']; ?>" 
									
									para_influenza_virus_1st = "<?php echo $row['Para_Influenza_Virus_1st']; ?>"  
									para_influenza_virus_2nd = "<?php echo $row['Para_Influenza_Virus_2nd']; ?>"  
									para_influenza_virus_3rd = "<?php echo $row['Para_Influenza_Virus_3rd']; ?>"  
									para_influenza_virus_4th = "<?php echo $row['Para_Influenza_Virus_4th']; ?>"  
									para_influenza_virus_5th = "<?php echo $row['Para_Influenza_Virus_5th']; ?>"  
									para_influenza_virus_6th = "<?php echo $row['Para_Influenza_Virus_6th']; ?>"  
									para_influenza_virus_7th = "<?php echo $row['Para_Influenza_Virus_7th']; ?>"  
									para_influenza_virus_8th = "<?php echo $row['Para_Influenza_Virus_8th']; ?>"  
									para_influenza_virus_9th = "<?php echo $row['Para_Influenza_Virus_9th']; ?>"  
									para_influenza_virus_10th = "<?php echo $row['Para_Influenza_Virus_10th']; ?>"  
									
									leptospirosis_1st = "<?php echo $row['Leptospirosis_1st']; ?>" 
									leptospirosis_2nd = "<?php echo $row['Leptospirosis_2nd']; ?>" 
									leptospirosis_3rd = "<?php echo $row['Leptospirosis_3rd']; ?>" 
									leptospirosis_4th = "<?php echo $row['Leptospirosis_4th']; ?>" 
									leptospirosis_5th = "<?php echo $row['Leptospirosis_5th']; ?>" 
									leptospirosis_6th = "<?php echo $row['Leptospirosis_6th']; ?>" 
									leptospirosis_7th = "<?php echo $row['Leptospirosis_7th']; ?>" 
									leptospirosis_8th = "<?php echo $row['Leptospirosis_8th']; ?>" 
									leptospirosis_9th = "<?php echo $row['Leptospirosis_9th']; ?>" 
									leptospirosis_10th = "<?php echo $row['Leptospirosis_10th']; ?>" 
									
									bordetella_1st = "<?php echo $row['Bordetella_1st']; ?>" 
									bordetella_2nd = "<?php echo $row['Bordetella_2nd']; ?>" 
									bordetella_3rd = "<?php echo $row['Bordetella_3rd']; ?>" 
									bordetella_4th = "<?php echo $row['Bordetella_4th']; ?>" 
									bordetella_5th = "<?php echo $row['Bordetella_5th']; ?>" 
									bordetella_6th = "<?php echo $row['Bordetella_6th']; ?>" 
									bordetella_7th = "<?php echo $row['Bordetella_7th']; ?>" 
									bordetella_8th = "<?php echo $row['Bordetella_8th']; ?>" 
									bordetella_9th = "<?php echo $row['Bordetella_9th']; ?>" 
									bordetella_10th = "<?php echo $row['Bordetella_10th']; ?>" 
									
									lyme_disease_1st = "<?php echo $row['Lyme_Disease_1st']; ?>" 
									lyme_disease_2nd = "<?php echo $row['Lyme_Disease_2nd']; ?>" 
									lyme_disease_3rd = "<?php echo $row['Lyme_Disease_3rd']; ?>" 
									lyme_disease_4th = "<?php echo $row['Lyme_Disease_4th']; ?>" 
									lyme_disease_5th = "<?php echo $row['Lyme_Disease_5th']; ?>" 
									lyme_disease_6th = "<?php echo $row['Lyme_Disease_6th']; ?>" 
									lyme_disease_7th = "<?php echo $row['Lyme_Disease_7th']; ?>" 
									lyme_disease_8th = "<?php echo $row['Lyme_Disease_8th']; ?>" 
									lyme_disease_9th = "<?php echo $row['Lyme_Disease_9th']; ?>" 
									lyme_disease_10th = "<?php echo $row['Lyme_Disease_10th']; ?>" 
												
									pet_ID_update = "<?php echo $row['Pet_ID']; ?>"
									pet_ID_add = "<?php echo $row['Pet_ID']; ?>"
									pet_ID_next = "<?php echo $row['Pet_ID']; ?>"
									pet_ID_history = "<?php echo $row['Pet_ID']; ?>" 
									pet_ID_status = "<?php echo $row['Pet_ID']; ?>" 
									pet_name_label = "<?php echo $row['Pet_Name']; ?>" 
									pet_type = "<?php echo $row['Pet_Type']; ?>" 
									pet_breed = "<?php echo $row['Pet_Breed']; ?>"
									pet_breed_history = "<?php echo $row['Pet_Breed']; ?>"
									pet_gender = "<?php echo $row['Pet_Gender']; ?>"
									pet_age = "<?php echo $row['Pet_Age']; ?>"	
									pet_birthday = "<?php echo $row['Pet_Birthday']; ?>"
									pet_owner = "<?php echo $row['Pet_Owner']; ?>"
									pet_owner_next = "<?php echo $row['Pet_Owner']; ?>"
									pet_picture = "<?php echo $row['Pet_Picture']; ?>"
									owner_User_ID = "<?php echo $row['Owner_User_ID']; ?>"
									owner_User_ID_update = "<?php echo $row['Owner_User_ID']; ?>"
									owner_User_ID_add = "<?php echo $row['Owner_User_ID']; ?>"
									owner_User_ID_next = "<?php echo $row['Owner_User_ID']; ?>"
									owner_User_ID_history = "<?php echo $row['Owner_User_ID']; ?>"
									owner_User_ID_status = "<?php echo $row['Owner_User_ID']; ?>"
									pet_attending_vet = "<?php echo $row['Pet_Attending_Vet']; ?>"
									pet_status = "<?php echo $row['Pet_Status']; ?>"
									next_vaccination_date = "<?php echo $row['Next_Vaccination_Date']; ?>">
									
									<td class="hide" style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_ID']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Name']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Type']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Breed']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Gender']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Age']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Birthday']; ?></td>
									<td style="text-align:center; word-wrap: break-word;"><?php echo $row['Pet_Owner']; ?></td>
									
									</tr>
									</tbody>
									
								 <?php }?>
								 </table> 
              </div><!--/table-resp--> 

			  
					 <?php
					$previous = $page-1;

					if ($previous < 1) {
						 $previous = $page;
					}
					?>
					

		  
									<ul class="pagination pull-left laquo">
										<li><a href="thesis_vet_page.php?page=<?php echo $a-$a+1;  ?>&pet_id=">&laquo;</a></li>
										<li><a href="thesis_vet_page.php?page=<?php echo $previous;  ?>&pet_id="><</a></li>
									</ul>
			    <?php
								 
								 
								 $sql2 = "SELECT *, Current_Date(),\n"
									. " TIMESTAMPDIFF(YEAR,Pet_Birthday,Current_Date()) AS Pet_Age\n"
									. " FROM pet_info_db,vaccine_db\n" 
									. " WHERE pet_info_db.Pet_ID = vaccine_db.Pet_ID and pet_info_db.Pet_Vet_User_ID = '{$User_ID}'";
									 $result2=mysql_query($sql2,$con);
									 $cou=mysql_num_rows($result2);
									$a=$cou/5;
									$a= ceil ($a);
									
										$next = $page+1;

										if ($next > $a) {
											 $next = $page;
										}
										

										$b=1;
										$maximum=$a/2+1;
										
										
										if ($page >=$a/2) {
											 $b=$a/2;
											 $b= ceil ($b);
											 $maximum=$a;
										}
										

									


									echo"<br>"; echo"<br>";
									
									
									for($b;$b<=$a;$b++)
									{
										
									if(($b)<=$maximum){
									
									?>
									
									<ul class="pagination pull-left">
									<li><a href="thesis_vet_page.php?page=<?php echo $b;  ?>&pet_id="><?php echo $b.""; ?></a></li>
									</ul>
									
									<?php }} ?>
									<ul class="pagination pull-right">
									<li><strong>Page <?php echo $page;?> of <?php echo $a;?></strong></li>
									</ul>
									<ul class="pagination pull-left">
										<li><a href="thesis_vet_page.php?page=<?php echo $next;  ?>&pet_id=">></a></li>
										<li><a href="thesis_vet_page.php?page=<?php echo $a;  ?>&pet_id=">&raquo;</a></li>
									</ul>
             </div><!--/tab-pane-->
  		   
              </div><!--/tab-pane-->
          </div><!--/tab-content-->

        </div><!--/col-9-->


<!-- Modal -->
            <div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
              <div class="modal-dialog">
                <div class="modal-content">
                  <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="text-danger fa fa-times"></i></button>
					
					<h3 class="modal-title" id="myModalLabel">
						<div class="row">
							<div class="col-md-offset-4"> 
							<i class="text-muted glyphicon glyphicon-hand-right"></i>&nbsp;
								<strong>Immunization Record (yr-mm-dd)</strong>
							</div>
						<div>
						<hr>
					</h3>	
					<h4 class="modal-title" id="myModalLabel">
						<div class="row">
						<div class="col-md-2"> 
							 <img id="Pet_Picture" class="img-thumbnail"  style="width:180px;height:180px;">
							</div>
						
						<div class="row">		
							<div class="col-md-4"> 
							Pet Name:&nbsp;<strong><span id="Pet_Name_Label"></span></strong>
							</div>	
							<div class="col-md-5  pull-right">
							Attending Veterinarian: <strong>&nbsp;<span id="Pet_Attending_Vet"></span></strong>
							</div>					
						<div class="row">
							<div class="col-md-4">
							Pet Type:&nbsp;<strong><span id="Pet_Type"></span></strong>
							</div>
								<div class="col-md-5  pull-right">
							Next Vaccination Schedule:&nbsp;<strong><span id="Next_Vaccination_Date"></span></strong>
							</div>
						<div class="row">
							<div class="col-md-4">
							Pet Breed:&nbsp;<strong><span id="Pet_Breed"></span></strong>
							</div>
							<div class="col-md-5  pull-right">
							Current Status:&nbsp;<strong><span id="Pet_Status"></span></strong>
							</div>
							<div class="col-md-6">
							Pet Gender:&nbsp;<strong><span id="Pet_Gender"></span></strong>
							</div>
							<div class="col-md-6">
							Pet Age:&nbsp;<strong><span id="Pet_Age"></span></strong>
							</div>
							<div class="col-md-6">
							Pet Birthday:&nbsp;<strong><span id="Pet_Birthday"></span></strong>
							</div>
							<div class="col-md-6">
							Pet Owner:&nbsp;<strong><a id="Owner_User_ID" target="_blank"><span id="Pet_Owner"></span></a></strong>
							</div>
						</div>
						</div>
						</div>
							
					    </div>
					</h4>
				</div>
               <div class="table-responsive" style="height: 57px; overflow: hidden; padding-right: 17px;">
			  <br>
						<table class='table table-bordered table-striped' id='table' style=" table-layout: fixed;  width: 100%">
								  <thead>
									<tr>
									  <th width="15%">Vaccine</th>
									  <th><center>1st</center></th>
									  <th><center>2nd</center></th>
									  <th><center>3rd</center></th>
									  <th><center>4th</center></th>
									  <th><center>5th</center></th>
									  <th><center>6th</center></th>
									  <th><center>7th</center></th>
									  <th><center>8th</center></th>
									  <th><center>9th</center></th>
									  <th><center>10th</center></th>
									</tr>
								  </thead>
						</table>
				</div>
				 
					
              <div class="table-responsive" style="height: 320px; overflow-y:scroll">
					<table class='table table-bordered table-striped' id='table' style=" table-layout: fixed;  width: 100%">
								 	<tbody>
									<tr>
									<td width="15%">Rabies</td>
									<td style="text-align:center" id="Rabies_1st"></td>
									<td style="text-align:center" id="Rabies_2nd"></td>
									<td style="text-align:center" id="Rabies_3rd"></td>
									<td style="text-align:center" id="Rabies_4th"></td>
									<td style="text-align:center" id="Rabies_5th"></td>
									<td style="text-align:center" id="Rabies_6th"></td>
									<td style="text-align:center" id="Rabies_7th"></td>
									<td style="text-align:center" id="Rabies_8th"></td>
									<td style="text-align:center" id="Rabies_9th"></td>
									<td style="text-align:center" id="Rabies_10th"></td>
								
									</tr>
									
									<tr>
									
									<td width="15%">Canine_Parvovirus</td>
									<td style="text-align:center" id="Canine_Parvovirus_1st"></td>
									<td style="text-align:center" id="Canine_Parvovirus_2nd"></td>
									<td style="text-align:center" id="Canine_Parvovirus_3rd"></td>
									<td style="text-align:center" id="Canine_Parvovirus_4th"></td>
									<td style="text-align:center" id="Canine_Parvovirus_5th"></td>
									<td style="text-align:center" id="Canine_Parvovirus_6th"></td>
									<td style="text-align:center" id="Canine_Parvovirus_7th"></td>
									<td style="text-align:center" id="Canine_Parvovirus_8th"></td>
									<td style="text-align:center" id="Canine_Parvovirus_9th"></td>
									<td style="text-align:center" id="Canine_Parvovirus_10th"></td>
									</tr>
									
									<tr>
									
									<td width="15%">Canine_Distemper</td>
									<td style="text-align:center" id="Canine_Distemper_1st"></td>
									<td style="text-align:center" id="Canine_Distemper_2nd"></td>
									<td style="text-align:center" id="Canine_Distemper_3rd"></td>
									<td style="text-align:center" id="Canine_Distemper_4th"></td>
									<td style="text-align:center" id="Canine_Distemper_5th"></td>
									<td style="text-align:center" id="Canine_Distemper_6th"></td>
									<td style="text-align:center" id="Canine_Distemper_7th"></td>
									<td style="text-align:center" id="Canine_Distemper_8th"></td>
									<td style="text-align:center" id="Canine_Distemper_9th"></td>
									<td style="text-align:center" id="Canine_Distemper_10th"></td>
									</tr>
									
									<tr>
									<td width="15%">Canine_Adenovirus_2</td>
									<td style="text-align:center" id="Canine_Adenovirus_2_1st"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_2nd"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_3rd"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_4th"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_5th"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_6th"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_7th"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_8th"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_9th"></td>
									<td style="text-align:center" id="Canine_Adenovirus_2_10th"></td>
									</tr>
									
									<tr>
									<td width="15%">Para_Influenza_Virus</td>
									<td style="text-align:center" id="Para_Influenza_Virus_1st"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_2nd"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_3rd"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_4th"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_5th"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_6th"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_7th"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_8th"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_9th"></td>
									<td style="text-align:center" id="Para_Influenza_Virus_10th"></td>
									</tr>
									
									<tr>
									<td width="15%">Leptospirosis</td>
									<td style="text-align:center" id="Leptospirosis_1st"></td>
									<td style="text-align:center" id="Leptospirosis_2nd"></td>
									<td style="text-align:center" id="Leptospirosis_3rd"></td>
									<td style="text-align:center" id="Leptospirosis_4th"></td>
									<td style="text-align:center" id="Leptospirosis_5th"></td>
									<td style="text-align:center" id="Leptospirosis_6th"></td>
									<td style="text-align:center" id="Leptospirosis_7th"></td>
									<td style="text-align:center" id="Leptospirosis_8th"></td>
									<td style="text-align:center" id="Leptospirosis_9th"></td>
									<td style="text-align:center" id="Leptospirosis_10th"></td>
									</tr>
									
									<tr>
									<td width="15%">Bordetella</td>
									<td style="text-align:center" id="Bordetella_1st"></td>
									<td style="text-align:center" id="Bordetella_2nd"></td>
									<td style="text-align:center" id="Bordetella_3rd"></td>
									<td style="text-align:center" id="Bordetella_4th"></td>
									<td style="text-align:center" id="Bordetella_5th"></td>
									<td style="text-align:center" id="Bordetella_6th"></td>
									<td style="text-align:center" id="Bordetella_7th"></td>
									<td style="text-align:center" id="Bordetella_8th"></td>
									<td style="text-align:center" id="Bordetella_9th"></td>
									<td style="text-align:center" id="Bordetella_10th"></td>
									</tr>
									
									<tr>
									<td width="15%">Lyme_Disease</td>
									<td style="text-align:center" id="Lyme_Disease_1st"></td>
									<td style="text-align:center" id="Lyme_Disease_2nd"></td>
									<td style="text-align:center" id="Lyme_Disease_3rd"></td>
									<td style="text-align:center" id="Lyme_Disease_4th"></td>
									<td style="text-align:center" id="Lyme_Disease_5th"></td>
									<td style="text-align:center" id="Lyme_Disease_6th"></td>
									<td style="text-align:center" id="Lyme_Disease_7th"></td>
									<td style="text-align:center" id="Lyme_Disease_8th"></td>
									<td style="text-align:center" id="Lyme_Disease_9th"></td>
									<td style="text-align:center" id="Lyme_Disease_10th"></td>
									</tr>
									
									</tbody>
								</table>  			
			</div><!--/table-resp-->
			<br>
			<div class="row">
				<div class="col-sm-3 col-md-offset-1 col-margin-left"><!--left col UPDATE IMMUNIZATION DATE-->
							
					<form method="post" action="thesis_vet_page_update_saving.php">
										<select name='pet_ID_update' hidden>
										<option id="Pet_ID_update"></option>
										</select>
										<select name='owner_User_ID_update' hidden>
										<option id="Owner_User_ID_update"></option>
										</select>
										
					  <ul class="list-group">
						<li class="list-group-item text-center"><strong><u>Update</u> Immunization Date</strong></li>
									
									
						<li class="list-group-item"><select class="form-control placeholder" name='select_vaccine_type' required title="Select Vaccine Type to Update!">
							<option value="" disabled selected class="s">Select Vaccine Type</option>
										<option>Rabies_</option>	
										<option>Canine_Parvovirus_</option>	
										<option>Canine_Distemper_</option>	
										<option>Canine_Adenovirus_2_</option>	
										<option>Para_Influenza_Virus_</option>	
										<option>Leptospirosis_</option>	
										<option>Bordetella_</option>	
										<option>Lyme_Disease_</option>	
						</select></li>
						
						<li class="list-group-item"><select class="form-control placeholder" name='select_vaccine_order' required title="Select Vaccine Order Number to Update!">
							<option value="" disabled selected class="s">Select Vaccine Order No.</option>
										<option>1st</option>	
										<option>2nd</option>	
										<option>3rd</option>	
										<option>4th</option>	
										<option>5th</option>	
										<option>6th</option>	
										<option>7th</option>	
										<option>8th</option>	
										<option>9th</option>
										<option>10th</option>
						</select></li>
						
							
							
							<li class="list-group-item"><select class="form-control placeholder" name='select_veterinarian' required title="Select Veterinarian to Update!">
								<option value="" disabled selected class="s">Select Assigned Veterinarian</option>
								
										<?php

											require_once("includes/database.php"); 
											$sql="SELECT * FROM user_db
											WHERE User_Level = '2'";
											 $result=mysql_query($sql,$con);
											 
											 if (false === $result) {
													echo mysql_error();
												}
												
											 while($row=mysql_fetch_array($result))
											 {

											?>
								
								
										<option><?php echo $row['Last_Name']; ?></option>	
										<?php } ?>
										
							</select></li>
							
						
						
						<li class="list-group-item"><input placeholder="Date of Immunization" type="text" name="date_of_immunization" class="form-control" name="icode" onfocus="(this.type='date')" onblur="(this.type='text')" required title="Input the Date of Immunizaton to Update!"></li>
						<button id="update-button" class="btn btn-primary btn-block" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Update</button>
					</form>
					  </ul> 
				 	 
				</div><!--/col-3-->
			
			<div class="col-sm-3"><!--left col ADD IMMUNIZATION DATE-->
					  <ul class="list-group">
				<li class="list-group-item text-center"><strong><u>Add</u> Immunization Date</strong></li>
				<form method="post" action="thesis_vet_page_add_saving.php">
							<select name='pet_ID_add' hidden>
							<option id="Pet_ID_add"></option>
							</select>
							<select name='owner_User_ID_add' hidden>
							<option id="Owner_User_ID_add"></option>
							</select>			
							
				<li class="list-group-item"><select class="form-control placeholder" name='select_vaccine_type' required title="Select Vaccine Type to Add!">
					<option value="" disabled selected class="s">Select Vaccine Type</option>
								<option>Rabies_</option>	
								<option>Canine_Parvovirus_</option>	
								<option>Canine_Distemper_</option>	
								<option>Canine_Adenovirus_2_</option>	
								<option>Para_Influenza_Virus_</option>	
								<option>Leptospirosis_</option>	
								<option>Bordetella_</option>	
								<option>Lyme_Disease_</option>	
				</select></li>
				
				<li class="list-group-item"><select class="form-control placeholder" name='select_vaccine_order' required title="Select Vaccine Order to Add">
					<option value="" disabled selected class="s">Select Vaccine Order No.</option>
								<option>1st</option>	
								<option>2nd</option>	
								<option>3rd</option>	
								<option>4th</option>	
								<option>5th</option>	
								<option>6th</option>	
								<option>7th</option>	
								<option>8th</option>	
								<option>9th</option>
								<option>10th</option>
				</select></li>
				
				<li class="list-group-item"><select class="form-control placeholder" name='select_veterinarian' required title="Select Veterinarian to Add!">
						<option value="" disabled selected class="s">Select Assigned Veterinarian</option>
						
								<?php

									require_once("includes/database.php"); 
									$sql="SELECT * FROM user_db
									WHERE User_Level = '2'";
									 $result=mysql_query($sql,$con);
									 
									 if (false === $result) {
											echo mysql_error();
										}
										
									 while($row=mysql_fetch_array($result))
									 {

									?>
						
						
								<option><?php echo $row['Last_Name']; ?></option>	
								<?php } ?>
								
				</select></li>
				
				
				<li class="list-group-item"><input placeholder="Date of Immunization" type="text" name="date_of_immunization" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')" required title="Input the Date of Immunization to Add"></li>
				<button id="add-button" class="btn btn-primary btn-block" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Add</button>
				</form>
			  </ul>
			  

					</div><!--/col-3-->	
					
			<div class="col-sm-3"><!--left col UPDATE NEXT VACCINATION SCHEDULE-->
			
					<ul class="list-group">

							<li class="list-group-item text-center"><strong><u>Update</u> Next Vaccination Schedule</strong></li>
						<form method="post" action="thesis_vet_page_next_schedule_saving.php">
									<select name='pet_ID_next' hidden>
									<option id="Pet_ID_next"></option>
									</select>
									<select name='owner_User_ID_next' hidden>
									<option id="Owner_User_ID_next"></option>
									</select>
									<select name='pet_owner_next' hidden>
									<option id="Pet_Owner_Next"></option>
									</select>
							
								<li class="list-group-item"><select class="form-control placeholder" name='select_vaccine_type' required title="Select Vaccine Type to Add!">
									<option value="" disabled selected class="s">Select Vaccine Type</option>
												<option>Rabies_</option>	
												<option>Canine_Parvovirus_</option>	
												<option>Canine_Distemper_</option>	
												<option>Canine_Adenovirus_2_</option>	
												<option>Para_Influenza_Virus_</option>	
												<option>Leptospirosis_</option>	
												<option>Bordetella_</option>	
												<option>Lyme_Disease_</option>	
															</select>
								</li>
				
								<li class="list-group-item"><select class="form-control placeholder" name='select_vaccine_order' required title="Select Vaccine Order to Add">
									<option value="" disabled selected class="s">Select Vaccine Order No.</option>
												<option>1st</option>	
												<option>2nd</option>	
												<option>3rd</option>	
												<option>4th</option>	
												<option>5th</option>	
												<option>6th</option>	
												<option>7th</option>	
												<option>8th</option>	
												<option>9th</option>
												<option>10th</option>
															</select>
								</li>
								
								<li class="list-group-item"><input placeholder="Additional Note (Optional)" type="text" name="additional_note" class="form-control" required title="Input the Date of the Next Vaccination"></li>
				
								<li class="list-group-item"><input placeholder="Date of Next Vaccination" type="text" name="date_of_next_vaccination" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')" required title="Input the Date of the Next Vaccination"></li>
								<button id="send-button" class="btn btn-primary btn-block" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Send</button>
								
						</form>
							
					</ul>

			</div><!--/col-3-->	

					
			</div>
			<Br><hr>
			
			
			
			
			
			
			<div class="col-md-offset-4"> <!--------------------------CONSULTATION HISTORY--------------------->
							<h3>&emsp;&emsp;&emsp;<i class="text-muted glyphicon glyphicon-hand-right"></i>&nbsp;
								<strong>Consultation History</strong></h3>
			</div>

				<div class="table-responsive" style="height: 357px; overflow-y: scroll;">
				
								<?php

									require_once("includes/database.php"); 
									$sql="SELECT * FROM consultation_history_db
									WHERE Pet_ID = '{$Pet_ID}'";
									 $result=mysql_query($sql,$con);
						

							 
							 if (false === $result) {
									echo mysql_error();
								}
								
								echo  " <table class='table table-bordered table-striped' id='table' style=' table-layout: fixed;  width: 100%'>
								  <thead>
									<tr>
									  <th width='10%'><center>Date</center></th>
									  <th width='15%'><center>Veterinarian</center></th>
									  <th width='27%'><center>Diagnosis</center></th>
									  <th width='27%'><center>Prescription</center></th>
									  <th width='19%'><center>Notes</center></th>
									</tr>
								  </thead>";
								  
							 while($row=mysql_fetch_array($result))
							 {
							 
							 
							 
								?>
								 	<tbody>
									<tr>
									<td width="10%" style="text-align:center; word-wrap: break-word;"><?php echo $row['Date']; ?></td>
									<td width="15%" style="text-align:center; word-wrap: break-word;"><?php echo $row['Veterinarian']; ?></td>
									<td width="27%" style="text-align:center; word-wrap: break-word;"><?php echo $row['Diagnosis']; ?></td>
									<td width="27%" style="text-align:center; word-wrap: break-word;"><?php echo $row['Prescription']; ?></td>
									<td width="19%" style="text-align:center; word-wrap: break-word;"><?php echo $row['Notes']; ?></td>
									</tr>
									
									</tbody>
									<?php } ?>
						</table> 
 
				
              </div><!--/table-resp-->
			 <hr> <br>
			  <div class="row">
						<form id="form-history" method="post">
									<select name='pet_ID_history' hidden>
									<option id="Pet_ID_history"></option>
									</select>
									<select name='owner_User_ID_history' hidden>
									<option id="Owner_User_ID_history"></option>
									</select>
							<div class="col-md-3 col-md-offset-1 form-group">
							  <label for="comment">Diagnosis:</label>
							  <textarea name="diagnosis" placeholder="Type Your Diagnosis..." class="form-control" rows="6" id="comment" style="resize: none; width:320px;" required></textarea>
							</div>
							
							<div class="col-md-3 col-margin-left-history form-group">
							  <label for="comment">Prescription:</label>
							  <textarea name="prescription" placeholder="Type Your Prescription..." class="form-control" rows="6" id="comment" style="resize: none; width:320px;" required></textarea>
							</div>
							
							<div class="col-md-3 col-margin-left-history form-group">
							  <label for="comment">Notes:</label>
							  <textarea name="notes" placeholder="Type Your Notes..." class="form-control" rows="6" id="comment" style="resize: none; width:320px;" required></textarea>
							</div>
			 </div>
			 
			 <div class="row">
							<br>
							 	 
					<div class="col-sm-3 col-md-offset-1 col-margin-left"><!--left col UPDATE CONSULTATION HISTORY-->
					
						<ul class="list-group">
									<li class="list-group-item text-center"><strong><u>Update</u> Consultation History</strong></li>
									<li class="list-group-item"><select class="form-control placeholder" name='select_veterinarian_update_history'  title="Select Veterinarian to Update!">
									<option value="" disabled selected class="s">Select Assigned Veterinarian</option>
								
										<?php

											require_once("includes/database.php"); 
											$sql="SELECT * FROM user_db
											WHERE User_Level = '2'";
											 $result=mysql_query($sql,$con);
											 
											 if (false === $result) {
													echo mysql_error();
												}
												
											 while($row=mysql_fetch_array($result))
											 {

											?>
								
								
										<option><?php echo $row['Last_Name']; ?></option>	
										<?php } ?>
										
									</select></li>
									<li class="list-group-item"><input placeholder=" Date of Consultation to Update" type="text" name="date_of_consultation_update" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')"  title="Input the Date to Update"></li>
									<li class="list-group-item"><input placeholder=" Time of Consultation to Update" type="text" name="time_of_consultation_update" class="form-control" onfocus="(this.type='time')" onblur="(this.type='text')"  title="Input the Time to Update"></li>
									<button id="update-button-history" formaction="thesis_vet_page_consultation_history_update_saving.php" class="btn btn-primary btn-block" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Update</button>																		
						</ul>
					

					</div><!--/col-3-->	
					
					<div class="col-sm-3"><!--left col ADD CONSULTATION HISTORY-->
					
						<ul class="list-group">
									<li class="list-group-item text-center"><strong><u>Add</u> Consultation History</strong></li>
									<li class="list-group-item"><select class="form-control placeholder" name='select_veterinarian_add_history' title="Select Veterinarian to Add!">
									<option value="" disabled selected class="s">Select Assigned Veterinarian</option>
								
										<?php

											require_once("includes/database.php"); 
											$sql="SELECT * FROM user_db
											WHERE User_Level = '2'";
											 $result=mysql_query($sql,$con);
											 
											 if (false === $result) {
													echo mysql_error();
												}
												
											 while($row=mysql_fetch_array($result))
											 {

											?>
								
								
										<option><?php echo $row['Last_Name']; ?></option>	
										<?php } ?>
										
									</select></li>
									<li class="list-group-item"><input placeholder="Date of Consultation to Add" type="text" name="date_of_consultation_add" class="form-control" onfocus="(this.type='date')" onblur="(this.type='text')"  title="Input the Date to Add"></li>
									<li class="list-group-item"><input placeholder="Time of Consultation to Add" type="text" name="time_of_consultation_add" class="form-control" onfocus="(this.type='time')" onblur="(this.type='text')"  title="Input the Time to Add"></li>
									<button id="add-button-history" formaction="thesis_vet_page_consultation_history_add_saving.php" class="btn btn-primary btn-block" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Add</button>																		
						</ul>
					

					</div><!--/col-3-->
					</form>
					
					<form method="post" action="thesis_vet_page_status_update_saving.php">
									<select name='pet_ID_status' hidden>
									<option id="Pet_ID_status"></option>
									</select>
									<select name='owner_User_ID_status' hidden>
									<option id="Owner_User_ID_status"></option>
									</select>
					<div class="col-sm-3"><!--left col UPDATE STATUS-->
					
						<ul class="list-group">
									<li class="list-group-item text-center"><strong><u>Update</u> Status of Pet</strong></li>
									<li class="list-group-item"><input placeholder="Current Status of the Pet" type="text" name="pet_status" class="form-control" required title="Input the Status of the Pet"></li>
									<button id="update-button-status" class="btn btn-primary btn-block" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Update</button>																		
						</ul>
						

					</div><!--/col-3-->
					</form>
							 
			 </div>
						 
						 <br><br>
            </div>
            </div>
            </div>
</div>	 


</div><!-- fim Modal-->  
    </div> <!-- /container --> <!-- =================================MAIN CONTENT END!================================= -->


	
	
	
	
	
	
	
	
	
	
	
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
<script src="bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bootstrap/docs/assets/js/docs.min.js"></script>

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="bootstrap/docs/assets/js/ie10-viewport-bug-workaround.js"></script>



<script><!-- =================================PATIENT RECORD MODAL================================= -->
$(function () {
    /* BOOTSNIPP FULLSCREEN FIX */
    if (window.location == window.parent.location) {
        $('#back-to-bootsnipp').removeClass('hide');
        $('.alert').addClass('hide');
    } 
    
    $('#fullscreen').on('click', function(event) {
        event.preventDefault();
        window.parent.location = "http://bootsnipp.com/iframe/Q60Oj";
    });
    
    $('#your_patient > tr').on('click', function(event) {
        event.preventDefault();
		$('#myModal').modal('show');
    })
    
    $('.btn-mais-info').on('click', function(event) {
        $( '.open_info' ).toggleClass( "hide" );
    })
	  

     
});

$('.rowMember').on('click',function(event){
  event.preventDefault();
var Rabies_1st = $(this).attr('rabies_1st');
var Rabies_2nd = $(this).attr('rabies_2nd');
var Rabies_3rd = $(this).attr('rabies_3rd');
var Rabies_4th = $(this).attr('rabies_4th');
var Rabies_5th = $(this).attr('rabies_5th');
var Rabies_6th = $(this).attr('rabies_6th');
var Rabies_7th = $(this).attr('rabies_7th');
var Rabies_8th = $(this).attr('rabies_8th');
var Rabies_9th = $(this).attr('rabies_9th');
var Rabies_10th = $(this).attr('rabies_10th');

var Canine_Parvovirus_1st = $(this).attr('canine_parvovirus_1st');
var Canine_Parvovirus_2nd = $(this).attr('canine_parvovirus_2nd');
var Canine_Parvovirus_3rd = $(this).attr('canine_parvovirus_3rd');
var Canine_Parvovirus_4th = $(this).attr('canine_parvovirus_4th');
var Canine_Parvovirus_5th = $(this).attr('canine_parvovirus_5th');
var Canine_Parvovirus_6th = $(this).attr('canine_parvovirus_6th');
var Canine_Parvovirus_7th = $(this).attr('canine_parvovirus_7th');
var Canine_Parvovirus_8th = $(this).attr('canine_parvovirus_8th');
var Canine_Parvovirus_9th = $(this).attr('canine_parvovirus_9th');
var Canine_Parvovirus_10th = $(this).attr('canine_parvovirus_10th');

var Canine_Distemper_1st = $(this).attr('canine_distemper_1st');
var Canine_Distemper_2nd = $(this).attr('canine_distemper_2nd');
var Canine_Distemper_3rd = $(this).attr('canine_distemper_3rd');
var Canine_Distemper_4th = $(this).attr('canine_distemper_4th');
var Canine_Distemper_5th = $(this).attr('canine_distemper_5th');
var Canine_Distemper_6th = $(this).attr('canine_distemper_6th');
var Canine_Distemper_7th = $(this).attr('canine_distemper_7th');
var Canine_Distemper_8th = $(this).attr('canine_distemper_8th');
var Canine_Distemper_9th = $(this).attr('canine_distemper_9th');
var Canine_Distemper_10th = $(this).attr('canine_distemper_10th');

var Canine_Adenovirus_2_1st = $(this).attr('canine_adenovirus_2_1st');
var Canine_Adenovirus_2_2nd = $(this).attr('canine_adenovirus_2_2nd');
var Canine_Adenovirus_2_3rd = $(this).attr('canine_adenovirus_2_3rd');
var Canine_Adenovirus_2_4th = $(this).attr('canine_adenovirus_2_4th');
var Canine_Adenovirus_2_5th = $(this).attr('canine_adenovirus_2_5th');
var Canine_Adenovirus_2_6th = $(this).attr('canine_adenovirus_2_6th');
var Canine_Adenovirus_2_7th = $(this).attr('canine_adenovirus_2_7th');
var Canine_Adenovirus_2_8th = $(this).attr('canine_adenovirus_2_8th');
var Canine_Adenovirus_2_9th = $(this).attr('canine_adenovirus_2_9th');
var Canine_Adenovirus_2_10th = $(this).attr('canine_adenovirus_2_10th');

var Para_Influenza_Virus_1st = $(this).attr('para_influenza_virus_1st');
var Para_Influenza_Virus_2nd = $(this).attr('para_influenza_virus_2nd');
var Para_Influenza_Virus_3rd = $(this).attr('para_influenza_virus_3rd');
var Para_Influenza_Virus_4th = $(this).attr('para_influenza_virus_4th');
var Para_Influenza_Virus_5th = $(this).attr('para_influenza_virus_5th');
var Para_Influenza_Virus_6th = $(this).attr('para_influenza_virus_6th');
var Para_Influenza_Virus_7th = $(this).attr('para_influenza_virus_7th');
var Para_Influenza_Virus_8th = $(this).attr('para_influenza_virus_8th');
var Para_Influenza_Virus_9th = $(this).attr('para_influenza_virus_9th');
var Para_Influenza_Virus_10th = $(this).attr('para_influenza_virus_10th');

var Leptospirosis_1st = $(this).attr('leptospirosis_1st');
var Leptospirosis_2nd = $(this).attr('leptospirosis_2nd');
var Leptospirosis_3rd = $(this).attr('leptospirosis_3rd');
var Leptospirosis_4th = $(this).attr('leptospirosis_4th');
var Leptospirosis_5th = $(this).attr('leptospirosis_5th');
var Leptospirosis_6th = $(this).attr('leptospirosis_6th');
var Leptospirosis_7th = $(this).attr('leptospirosis_7th');
var Leptospirosis_8th = $(this).attr('leptospirosis_8th');
var Leptospirosis_9th = $(this).attr('leptospirosis_9th');
var Leptospirosis_10th = $(this).attr('leptospirosis_10th');

var Bordetella_1st = $(this).attr('bordetella_1st');
var Bordetella_2nd = $(this).attr('bordetella_2nd');
var Bordetella_3rd = $(this).attr('bordetella_3rd');
var Bordetella_4th = $(this).attr('bordetella_4th');
var Bordetella_5th = $(this).attr('bordetella_5th');
var Bordetella_6th = $(this).attr('bordetella_6th');
var Bordetella_7th = $(this).attr('bordetella_7th');
var Bordetella_8th = $(this).attr('bordetella_8th');
var Bordetella_9th = $(this).attr('bordetella_9th');
var Bordetella_10th = $(this).attr('bordetella_10th');

var Lyme_Disease_1st = $(this).attr('lyme_disease_1st');
var Lyme_Disease_2nd = $(this).attr('lyme_disease_2nd');
var Lyme_Disease_3rd = $(this).attr('lyme_disease_3rd');
var Lyme_Disease_4th = $(this).attr('lyme_disease_4th');
var Lyme_Disease_5th = $(this).attr('lyme_disease_5th');
var Lyme_Disease_6th = $(this).attr('lyme_disease_6th');
var Lyme_Disease_7th = $(this).attr('lyme_disease_7th');
var Lyme_Disease_8th = $(this).attr('lyme_disease_8th');
var Lyme_Disease_9th = $(this).attr('lyme_disease_9th');
var Lyme_Disease_10th = $(this).attr('lyme_disease_10th');



var Pet_ID_update = $(this).attr('pet_ID_update');
var Pet_ID_add = $(this).attr('pet_ID_add');
var Pet_ID_next = $(this).attr('pet_ID_next');
var Pet_ID_history = $(this).attr('pet_ID_history');
var Pet_ID_status = $(this).attr('pet_ID_status');
var Pet_Name_Label = $(this).attr('pet_name_label');
var Pet_Type = $(this).attr('pet_type');
var Pet_Breed = $(this).attr('pet_breed');
var Pet_Breed_history = $(this).attr('pet_breed_history');
var Pet_Gender = $(this).attr('pet_gender');
var Pet_Age = $(this).attr('pet_age');
var Pet_Birthday = $(this).attr('pet_birthday');
var Pet_Owner = $(this).attr('pet_owner');
var Pet_Owner_Next = $(this).attr('pet_owner_next');
var Pet_Picture = $(this).attr('pet_picture');
var Owner_User_ID = $(this).attr('owner_User_ID');
var Owner_User_ID_update = $(this).attr('owner_User_ID_update');
var Owner_User_ID_add = $(this).attr('owner_User_ID_add');
var Owner_User_ID_next = $(this).attr('owner_User_ID_next');
var Owner_User_ID_history = $(this).attr('owner_User_ID_history');
var Owner_User_ID_status = $(this).attr('owner_User_ID_status');
var Pet_Attending_Vet = $(this).attr('pet_attending_vet');
var Pet_Status = $(this).attr('pet_status');
var Next_Vaccination_Date = $(this).attr('next_vaccination_date');

$('#Rabies_1st').text(Rabies_1st);
$('#Rabies_2nd').text(Rabies_2nd);
$('#Rabies_3rd').text(Rabies_3rd);
$('#Rabies_4th').text(Rabies_4th);
$('#Rabies_5th').text(Rabies_5th);
$('#Rabies_6th').text(Rabies_6th);
$('#Rabies_7th').text(Rabies_7th);
$('#Rabies_8th').text(Rabies_8th);
$('#Rabies_9th').text(Rabies_9th);
$('#Rabies_10th').text(Rabies_10th);

$('#Canine_Parvovirus_1st').text(Canine_Parvovirus_1st);
$('#Canine_Parvovirus_2nd').text(Canine_Parvovirus_2nd);
$('#Canine_Parvovirus_3rd').text(Canine_Parvovirus_3rd);
$('#Canine_Parvovirus_4th').text(Canine_Parvovirus_4th);
$('#Canine_Parvovirus_5th').text(Canine_Parvovirus_5th);
$('#Canine_Parvovirus_6th').text(Canine_Parvovirus_6th);
$('#Canine_Parvovirus_7th').text(Canine_Parvovirus_7th);
$('#Canine_Parvovirus_8th').text(Canine_Parvovirus_8th);
$('#Canine_Parvovirus_9th').text(Canine_Parvovirus_9th);
$('#Canine_Parvovirus_10th').text(Canine_Parvovirus_10th);

$('#Canine_Distemper_1st').text(Canine_Distemper_1st);
$('#Canine_Distemper_2nd').text(Canine_Distemper_2nd);
$('#Canine_Distemper_3rd').text(Canine_Distemper_3rd);
$('#Canine_Distemper_4th').text(Canine_Distemper_4th);
$('#Canine_Distemper_5th').text(Canine_Distemper_5th);
$('#Canine_Distemper_6th').text(Canine_Distemper_6th);
$('#Canine_Distemper_7th').text(Canine_Distemper_7th);
$('#Canine_Distemper_8th').text(Canine_Distemper_8th);
$('#Canine_Distemper_9th').text(Canine_Distemper_9th);
$('#Canine_Distemper_10th').text(Canine_Distemper_10th);

$('#Canine_Adenovirus_2_1st').text(Canine_Adenovirus_2_1st);
$('#Canine_Adenovirus_2_2nd').text(Canine_Adenovirus_2_2nd);
$('#Canine_Adenovirus_2_3rd').text(Canine_Adenovirus_2_3rd);
$('#Canine_Adenovirus_2_4th').text(Canine_Adenovirus_2_4th);
$('#Canine_Adenovirus_2_5th').text(Canine_Adenovirus_2_5th);
$('#Canine_Adenovirus_2_6th').text(Canine_Adenovirus_2_6th);
$('#Canine_Adenovirus_2_7th').text(Canine_Adenovirus_2_7th);
$('#Canine_Adenovirus_2_8th').text(Canine_Adenovirus_2_8th);
$('#Canine_Adenovirus_2_9th').text(Canine_Adenovirus_2_9th);
$('#Canine_Adenovirus_2_10th').text(Canine_Adenovirus_2_10th);

$('#Para_Influenza_Virus_1st').text(Para_Influenza_Virus_1st);
$('#Para_Influenza_Virus_2nd').text(Para_Influenza_Virus_2nd);
$('#Para_Influenza_Virus_3rd').text(Para_Influenza_Virus_3rd);
$('#Para_Influenza_Virus_4th').text(Para_Influenza_Virus_4th);
$('#Para_Influenza_Virus_5th').text(Para_Influenza_Virus_5th);
$('#Para_Influenza_Virus_6th').text(Para_Influenza_Virus_6th);
$('#Para_Influenza_Virus_7th').text(Para_Influenza_Virus_7th);
$('#Para_Influenza_Virus_8th').text(Para_Influenza_Virus_8th);
$('#Para_Influenza_Virus_9th').text(Para_Influenza_Virus_9th);
$('#Para_Influenza_Virus_10th').text(Para_Influenza_Virus_10th);

$('#Leptospirosis_1st').text(Leptospirosis_1st);
$('#Leptospirosis_2nd').text(Leptospirosis_2nd);
$('#Leptospirosis_3rd').text(Leptospirosis_3rd);
$('#Leptospirosis_4th').text(Leptospirosis_4th);
$('#Leptospirosis_5th').text(Leptospirosis_5th);
$('#Leptospirosis_6th').text(Leptospirosis_6th);
$('#Leptospirosis_7th').text(Leptospirosis_7th);
$('#Leptospirosis_8th').text(Leptospirosis_8th);
$('#Leptospirosis_9th').text(Leptospirosis_9th);
$('#Leptospirosis_10th').text(Leptospirosis_10th);

$('#Bordetella_1st').text(Bordetella_1st);
$('#Bordetella_2nd').text(Bordetella_2nd);
$('#Bordetella_3rd').text(Bordetella_3rd);
$('#Bordetella_4th').text(Bordetella_4th);
$('#Bordetella_5th').text(Bordetella_5th);
$('#Bordetella_6th').text(Bordetella_6th);
$('#Bordetella_7th').text(Bordetella_7th);
$('#Bordetella_8th').text(Bordetella_8th);
$('#Bordetella_9th').text(Bordetella_9th);
$('#Bordetella_10th').text(Bordetella_10th);

$('#Lyme_Disease_1st').text(Lyme_Disease_1st);
$('#Lyme_Disease_2nd').text(Lyme_Disease_2nd);
$('#Lyme_Disease_3rd').text(Lyme_Disease_3rd);
$('#Lyme_Disease_4th').text(Lyme_Disease_4th);
$('#Lyme_Disease_5th').text(Lyme_Disease_5th);
$('#Lyme_Disease_6th').text(Lyme_Disease_6th);
$('#Lyme_Disease_7th').text(Lyme_Disease_7th);
$('#Lyme_Disease_8th').text(Lyme_Disease_8th);
$('#Lyme_Disease_9th').text(Lyme_Disease_9th);
$('#Lyme_Disease_10th').text(Lyme_Disease_10th);

$('#Pet_ID_update').text(Pet_ID_update);
$('#Pet_ID_add').text(Pet_ID_add);
$('#Pet_ID_next').text(Pet_ID_next);
$('#Pet_ID_history').text(Pet_ID_history);
$('#Pet_ID_status').text(Pet_ID_status);
$('#Pet_Name_Label').text(Pet_Name_Label);
$('#Pet_Type').text(Pet_Type);
$('#Pet_Breed').text(Pet_Breed);
$('#Pet_Breed_history').text(Pet_Breed_history);
$('#Pet_Gender').text(Pet_Gender);
$('#Pet_Age').text(Pet_Age);
$('#Pet_Birthday').text(Pet_Birthday);
$('#Pet_Owner').text(Pet_Owner);
$('#Pet_Owner_Next').text(Pet_Owner_Next);
$('#Pet_Picture').attr('src',Pet_Picture);
$('#Owner_User_ID').attr('href','thesis_view_profile_user.php?Owner_User_ID='+Owner_User_ID);
$('#Owner_User_ID_update').text(Owner_User_ID_update);
$('#Owner_User_ID_add').text(Owner_User_ID_add);
$('#Owner_User_ID_next').text(Owner_User_ID_next);
$('#Owner_User_ID_history').text(Owner_User_ID_history);
$('#Owner_User_ID_status').text(Owner_User_ID_status);
$('#Pet_Attending_Vet').text(Pet_Attending_Vet);
$('#Pet_Status').text(Pet_Status);
$('#Next_Vaccination_Date').text(Next_Vaccination_Date);

});
</script>

<script><!-- =================================UPDATE CONFIRMATION================================= -->
$("#update-button").click(function(){
    if(confirm("Are you sure you want to Update date of immunization?")){
        $("#update-button").attr("href", "thesis_vet_page_update_saving.php");
    }
    else{
        return false;
    }
});
</script>

<script><!-- =================================ADD CONFIRMATION================================= -->
$("#add-button").click(function(){
    if(confirm("Are you sure you want to Add date of Immunization?")){
        $("#add-button").attr("href", "thesis_vet_page_add_saving.php");
    }
    else{
        return false;
    }
});
</script>

<script><!-- =================================SEND CONFIRMATION================================= -->
$("#send-button").click(function(){
    if(confirm("Are you sure you want to Update Next Vaccination Schedule?")){
        $("send-button").attr("href", "thesis_vet_page_next_schedule_saving.php");
    }
    else{
        return false;
    }
});
</script>

<script><!-- =================================UPDATE-BUTTON-HISTORY- CONFIRMATION-================================= -->
$("#update-button-history").click(function(){
    if(confirm("Are you sure you want to Update Consultation History?")){
        $("update-button-history").attr("href", "thesis_vet_page_consultation_history_update_saving");
    }
    else{
        return false;
    }
});
</script>

<script><!-- =================================ADD-BUTTON-HISTORY CONFIRMATION--================================= -->
$("#add-button-history").click(function(){
    if(confirm("Are you sure you want to Add Consultation History?")){
        $("add-button-history").attr("href", "thesis_vet_page_consultation_history_add_saving");
    }
    else{
        return false;
    }
});
</script>

<script><!-- =================================UPDATE_BUTTON_STATUS-CONFIRMATION -================================= -->
$("#update-button-status").click(function(){
    if(confirm("Are you sure you want to Update the Current Status of your Patient?")){
        $("update-button-status").attr("href", "thesis_vet_page_status_update_saving");
    }
    else{
        return false;
    }
});
</script>




<!-- Script for Placeholder -->
<script>
$('select').change(function() {
if ($(this).children('option:first-child').is(':selected')) {
$(this).addClass('placeholder');
} else {
$(this).removeClass('placeholder');
}
});
</script>	


<script><!-- ================================= SKY BLUE BORDER================================= -->	
$(document).ready(function(){

  	   var name = "<?=$_GET['pet_id']?>";
  	  
  	   if(name){
		   $('.rowMember td').each(function(){
		   		if($(this).html() == name){
		   			$(this).parent().css('border','4px solid #87CEEB').click();
		   		} 
		   });
  	   }
	});

</script>

 <?php include 'thesis_back_to_top_script.php'; ?>


  </body>
</html>
